import styles from '../styles/Home.module.css'
import Link from 'next/link'
import Router from 'next/router'
export default function Home() {
  const goPage=(path)=>{
    Router.push(path)
  }
  Router.events.on('routeChangeStart', (...args)=>{
    console.log(1);
    console.log('1.routeChangeStart->路由开始变化,参数为:',...args)
  })

  Router.events.on('routeChangeComplete', (args)=>{
    console.log(args);
    console.log('1.routeChangeStart->路由jies,参数为:',...args)
  })
  return (
    <div className={styles.container}>
      index
      <Link href="test">
        <span>123</span>
      </Link>

      <button onClick={()=>{goPage('/blog?name=ttq')}}>go blog</button>
    </div>
  )
}
